import request from '@/utils/request'
// 关键词需要的接口

/* 关键词开始 */
//  根据appid、orgId查询全部Campaign   头部选择全部广告系列组de


// 根据appid获取推荐关键词
export const  getWordFromAppId= (data) => {
  return request({
    method: 'post',
    url: '/words/recommendWord',
    data: data,
  })
}


// 根据appid获取推荐关键词===搜索
export const  getRelevant= (data) => {
  return request({
    method: 'post',
    url: '/words/relevant',
    data
  })
}



// 根据广告组获取关键词组
export const findReportKeywordList = (data) => {
  return request({
    method: 'post',
    url: '/reports/findReportKeywordList',
    data,
  })
}


// 关键词组数据总和
export const findReportKeywordListTotal = (quey) => {
  return request({
    method: 'post',
    url: '/reports/findReportKeywordListTotal',
    data: quey,
  })
}


// 关键词组数据下载
export const downloadKeywordCsv = (quey) => {
  return request({
    method: 'post',
    url: '/reports/downloadKeywordCsv',
    data: quey,
  })
}


// 增加关键词
export const addKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/keyords/add',
    data,
  })
}


// 批量修改关键词
export const modifyKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/keyords/modify',
    data,
  })
}

// 批量调整关键词出价
export const modifyPrice = (data) => {
  return request({
    method: 'post',
    url: '/keyords/modifyPrice',
    data,
  })
}


// 查询单个关键词详情
export const findReportKeywordTotal = (quey) => {
  return request({
    method: 'get',
    url: '/reports/findReportKeywordTotal',
    params: quey,
  })
}


// 查询单个关键词出价记录
export const findBidRecordList = (quey) => {
  return request({
    method: 'get',
    url: '/keyords/findBidRecordList',
    params: quey,
  })
}







/* 关键词结束*/


/* 搜索词开始 */
// 根据广告组获取搜索词
export const findReportSearchTermList = (quey) => {
  return request({
    method: 'post',
    url: '/reports/findReportSearchTermList',
    data: quey,
  })
}

// 搜索词的总和
export const findReportSearchTermListTotal = (quey) => {
  return request({
    method: 'post',
    url: '/reports/findReportSearchTermListTotal',
    data: quey,
  })
}


// 搜索词的下载接口
export const downloadSearchTermCsv = (quey) => {
  return request({
    method: 'post',
    url: '/reports/downloadSearchTermCsv',
    data: quey,
  })
}


// 单个搜索词详情接口
export const findReportSearchTermTotal = (quey) => {
  return request({
    method: 'get',
    url: '/reports/findReportSearchTermTotal',
    params: quey,
  })
}





/* 搜索词结束*/

/* 屏蔽词开始*/

// 根据广告组获取搜索词

// 根据广告组获取否定关键词组
export const findNegativeKeyWordsList = (quey) => {
  return request({
    method: 'get',
    url: '/negativeKeyWords/findList',
    params: quey,
  })
}




// 否定关键词组数据下载
export const downloadNegativeKeyWordsCsv = (quey) => {
  return request({
    method: 'get',
    url: '/negativeKeyWords/downloadNegativeKeyWordsCsv',
    params: quey,
  })
}


// 增加否定关键词到广告系列
export const addCampaignsNegativeKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/campaignsNegativeKeyWords/add',
    data,
  })
}


export const addNegativeKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/negativeKeyWords/add',
    data,
  })
}



// 批量删除广告组否定关键词
export const removeNegativeKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/negativeKeyWords/remove',
    data,
  })
}

// 批量删除广告系列否定关键词
export const removeCampaignsNegativeKeyWords = (data) => {
  return request({
    method: 'post',
    url: '/campaignsNegativeKeyWords/remove',
    data,
  })
}


/* 屏蔽词结束 */
